import lejos.robotics.subsumption.Behavior;

public class OnLine implements Behavior {
  private LineBot me;
  //private boolean isSuppressed = false;
  
  public OnLine(LineBot me) {
    this.me = me;
  }
  
  public boolean takeControl() {
    //System.out.println(me.isOnLine());
    return me.isOnLine();
  }
  
  public void action() {
    //System.out.println("OnLine");
    //isSuppressed = false;
    me.spiral();
    //while (!isSuppressed) {}
  }
  
  public void suppress() {
    //isSuppressed = true;
  }
}